qui(
    function (require, exports, module) {

        Record.Action = (function () {
            var recordPlanList = null;
            var recordTaskList = null;
            var recordChannelList = null;
            var recordChannelSginalTableList = null;

            function runPlanList() {
                if (!recordPlanList) {
                    recordPlanList = new Record.PlanGrid($.extend(true, {
                        $grid: $("#list"),
                        $container: $("#j-view-container"),
                        type: 0
                    }, {}));
                }
                EpgWeb.Plugin.Validate.bindDefaultHandler(function (msg) {
                    EpgWeb.Plugin.showTips({theme: "error", content: msg});
                })
                recordPlanList.doInit();
                console.log('plan grid run');
            }

            function runTaskList() {
                if (!recordTaskList) {
                    recordTaskList = new Record.TaskGrid($.extend(true, {
                        $grid: $("#list"),
                        $container: $("#j-view-container"),
                        type: 0
                    }, {}));
                }
                recordTaskList.doInit();
                console.log('task grid run');
            }

            function runChannelList() {
                if (!recordChannelList) {
                    recordChannelList = new Record.ChannelGrid($.extend(true, {
                        $grid: $("#list"),
                        $container: $("#j-view-container"),
                        type: 0
                    }, {}));
                }
                recordChannelList.doInit();
                console.log('channel grid run');
            }

            function runChannelSignalTableList() {
                if (!recordChannelSginalTableList) {
                    recordChannelSginalTableList = new Record.ChannelSignalTableGrid($.extend(true, {
                        $grid: $("#list"),
                        $container: $("#j-view-container"),
                        type: 0
                    }, {}));
                }
                recordChannelSginalTableList.doInit();
                console.log('channelSginalTableList grid run');
            }

            return {
                runPlanList: runPlanList,
                runTaskList: runTaskList,
                runChannelList: runChannelList,
                runChannelSignalTableList: runChannelSignalTableList
            }
        })();
    }
);